package com.ruoyi.tuikuanguanli.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tuikuanguanli.mapper.RefundRecordsMapper;
import com.ruoyi.tuikuanguanli.domain.RefundRecords;
import com.ruoyi.tuikuanguanli.service.IRefundRecordsService;

/**
 * 退款管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-09
 */
@Service
public class RefundRecordsServiceImpl implements IRefundRecordsService 
{
    @Autowired
    private RefundRecordsMapper refundRecordsMapper;

    /**
     * 查询退款管理
     * 
     * @param id 退款管理主键
     * @return 退款管理
     */
    @Override
    public RefundRecords selectRefundRecordsById(Long id)
    {
        return refundRecordsMapper.selectRefundRecordsById(id);
    }

    /**
     * 查询退款管理列表
     * 
     * @param refundRecords 退款管理
     * @return 退款管理
     */
    @Override
    public List<RefundRecords> selectRefundRecordsList(RefundRecords refundRecords)
    {
        return refundRecordsMapper.selectRefundRecordsList(refundRecords);
    }

    /**
     * 新增退款管理
     * 
     * @param refundRecords 退款管理
     * @return 结果
     */
    @Override
    public int insertRefundRecords(RefundRecords refundRecords)
    {
        refundRecords.setCreateTime(DateUtils.getNowDate());
        return refundRecordsMapper.insertRefundRecords(refundRecords);
    }

    /**
     * 修改退款管理
     * 
     * @param refundRecords 退款管理
     * @return 结果
     */
    @Override
    public int updateRefundRecords(RefundRecords refundRecords)
    {
        return refundRecordsMapper.updateRefundRecords(refundRecords);
    }

    /**
     * 批量删除退款管理
     * 
     * @param ids 需要删除的退款管理主键
     * @return 结果
     */
    @Override
    public int deleteRefundRecordsByIds(Long[] ids)
    {
        return refundRecordsMapper.deleteRefundRecordsByIds(ids);
    }

    /**
     * 删除退款管理信息
     * 
     * @param id 退款管理主键
     * @return 结果
     */
    @Override
    public int deleteRefundRecordsById(Long id)
    {
        return refundRecordsMapper.deleteRefundRecordsById(id);
    }
}
